//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<xeres_dx9.cpp>
///	@path	~/src/graphics/dx9/
///	@date	2007/10/18
///	@desc	Use of DirectX 10 decl.

#include "config/config.h"

#include "graphics/dx9/import_dx9.h"
#include "graphics/dx9/CDevice9.h"
#include "graphics/dx9/CRenderer9.h"
#include "graphics/dx9/CSimpleGeometry9.h"

// force linker to link these libs
#pragma comment( linker , "/defaultlib:dxerr.lib" )
#pragma comment( linker , "/defaultlib:dxguid.lib" )

namespace xeres {

	bool LoadDirectX9( bool enable_debug )
	{
		TRACE_INFO( _S("Registering DirectX 9 graphics classes...") );

		dx9::InitializeDirect3D9( enable_debug , false );
		dx9::InitializeDirect3DX9( enable_debug , 40 );

		IOBJECT_REGISTER_CLASS( CDevice9 );
		IOBJECT_REGISTER_CLASS( CRenderer9 );
		IOBJECT_REGISTER_CLASS( CSimpleGeometry9 );

		return true;
	}

} // namespace xeres
